Skip to content

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Aug 23, 2024

Q A
Branch? main
Tickets n/a
License MIT
Doc PR n/a

Provide a more idiomatic way to mark an Eloquent model as an ApiResource (annotations still work!):

namespace App\Models;

use ApiPlatform\Laravel\IsApiResource;
use Illuminate\Database\Eloquent\Model;

class Author extends Model
{
    use IsApiResource;
}

@dunglas dunglas force-pushed the feat/laravel-trait branch from a4f0dc0 to af68e82 Compare August 23, 2024 16:28
@soyuka soyuka merged commit 9c46162 into api-platform:main Aug 26, 2024
@dunglas dunglas deleted the feat/laravel-trait branch August 26, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants